home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / dev / gcc / ppc-mos-gcc.lha / info / gcc.info-28 (.txt) < prev    next >
GNU Info File  |  2002-06-18  |  46KB  |  819 lines

  1. This is Info file gcc.info, produced by Makeinfo version 1.68 from the
  2. input file ./gcc.texi.
  3. INFO-DIR-SECTION Programming
  4. START-INFO-DIR-ENTRY
  5. * gcc: (gcc).                  The GNU Compiler Collection.
  6. END-INFO-DIR-ENTRY
  7.    This file documents the use and the internals of the GNU compiler.
  8.    Published by the Free Software Foundation 59 Temple Place - Suite 330
  9. Boston, MA 02111-1307 USA
  10.    Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
  11. 1999, 2000 Free Software Foundation, Inc.
  12.    Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.    Permission is granted to copy and distribute modified versions of
  16. this manual under the conditions for verbatim copying, provided also
  17. that the sections entitled "GNU General Public License" and "Funding
  18. for Free Software" are included exactly as in the original, and
  19. provided that the entire resulting derived work is distributed under
  20. the terms of a permission notice identical to this one.
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "GNU General Public
  24. License" and "Funding for Free Software", and this permission notice,
  25. may be included in translations approved by the Free Software Foundation
  26. instead of in the original English.
  27. File: gcc.info,  Node: Misc,  Prev: Cross-compilation,  Up: Target Macros
  28. Miscellaneous Parameters
  29. ========================
  30.    Here are several miscellaneous parameters.
  31. `PREDICATE_CODES'
  32.      Define this if you have defined special-purpose predicates in the
  33.      file `MACHINE.c'.  This macro is called within an initializer of an
  34.      array of structures.  The first field in the structure is the name
  35.      of a predicate and the second field is an array of rtl codes.  For
  36.      each predicate, list all rtl codes that can be in expressions
  37.      matched by the predicate.  The list should have a trailing comma.
  38.      Here is an example of two entries in the list for a typical RISC
  39.      machine:
  40.           #define PREDICATE_CODES \
  41.             {"gen_reg_rtx_operand", {SUBREG, REG}},  \
  42.             {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}},
  43.      Defining this macro does not affect the generated code (however,
  44.      incorrect definitions that omit an rtl code that may be matched by
  45.      the predicate can cause the compiler to malfunction).  Instead, it
  46.      allows the table built by `genrecog' to be more compact and
  47.      efficient, thus speeding up the compiler.  The most important
  48.      predicates to include in the list specified by this macro are
  49.      those used in the most insn patterns.
  50. `CASE_VECTOR_MODE'
  51.      An alias for a machine mode name.  This is the machine mode that
  52.      elements of a jump-table should have.
  53. `CASE_VECTOR_SHORTEN_MODE (MIN_OFFSET, MAX_OFFSET, BODY)'
  54.      Optional: return the preferred mode for an `addr_diff_vec' when
  55.      the minimum and maximum offset are known.  If you define this, it
  56.      enables extra code in branch shortening to deal with
  57.      `addr_diff_vec'.  To make this work, you also have to define
  58.      INSN_ALIGN and make the alignment for `addr_diff_vec' explicit.
  59.      The BODY argument is provided so that the offset_unsigned and scale
  60.      flags can be updated.
  61. `CASE_VECTOR_PC_RELATIVE'
  62.      Define this macro to be a C expression to indicate when jump-tables
  63.      should contain relative addresses.  If jump-tables never contain
  64.      relative addresses, then you need not define this macro.
  65. `CASE_DROPS_THROUGH'
  66.      Define this if control falls through a `case' insn when the index
  67.      value is out of range.  This means the specified default-label is
  68.      actually ignored by the `case' insn proper.
  69. `CASE_VALUES_THRESHOLD'
  70.      Define this to be the smallest number of different values for
  71.      which it is best to use a jump-table instead of a tree of
  72.      conditional branches.  The default is four for machines with a
  73.      `casesi' instruction and five otherwise.  This is best for most
  74.      machines.
  75. `WORD_REGISTER_OPERATIONS'
  76.      Define this macro if operations between registers with integral
  77.      mode smaller than a word are always performed on the entire
  78.      register.  Most RISC machines have this property and most CISC
  79.      machines do not.
  80. `LOAD_EXTEND_OP (MODE)'
  81.      Define this macro to be a C expression indicating when insns that
  82.      read memory in MODE, an integral mode narrower than a word, set the
  83.      bits outside of MODE to be either the sign-extension or the
  84.      zero-extension of the data read.  Return `SIGN_EXTEND' for values
  85.      of MODE for which the insn sign-extends, `ZERO_EXTEND' for which
  86.      it zero-extends, and `NIL' for other modes.
  87.      This macro is not called with MODE non-integral or with a width
  88.      greater than or equal to `BITS_PER_WORD', so you may return any
  89.      value in this case.  Do not define this macro if it would always
  90.      return `NIL'.  On machines where this macro is defined, you will
  91.      normally define it as the constant `SIGN_EXTEND' or `ZERO_EXTEND'.
  92. `SHORT_IMMEDIATES_SIGN_EXTEND'
  93.      Define this macro if loading short immediate values into registers
  94.      sign extends.
  95. `IMPLICIT_FIX_EXPR'
  96.      An alias for a tree code that should be used by default for
  97.      conversion of floating point values to fixed point.  Normally,
  98.      `FIX_ROUND_EXPR' is used.
  99. `FIXUNS_TRUNC_LIKE_FIX_TRUNC'
  100.      Define this macro if the same instructions that convert a floating
  101.      point number to a signed fixed point number also convert validly
  102.      to an unsigned one.
  103. `EASY_DIV_EXPR'
  104.      An alias for a tree code that is the easiest kind of division to
  105.      compile code for in the general case.  It may be `TRUNC_DIV_EXPR',
  106.      `FLOOR_DIV_EXPR', `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'.  These four
  107.      division operators differ in how they round the result to an
  108.      integer.  `EASY_DIV_EXPR' is used when it is permissible to use
  109.      any of those kinds of division and the choice should be made on
  110.      the basis of efficiency.
  111. `MOVE_MAX'
  112.      The maximum number of bytes that a single instruction can move
  113.      quickly between memory and registers or between two memory
  114.      locations.
  115. `MAX_MOVE_MAX'
  116.      The maximum number of bytes that a single instruction can move
  117.      quickly between memory and registers or between two memory
  118.      locations.  If this is undefined, the default is `MOVE_MAX'.
  119.      Otherwise, it is the constant value that is the largest value that
  120.      `MOVE_MAX' can have at run-time.
  121. `SHIFT_COUNT_TRUNCATED'
  122.      A C expression that is nonzero if on this machine the number of
  123.      bits actually used for the count of a shift operation is equal to
  124.      the number of bits needed to represent the size of the object
  125.      being shifted.  When this macro is non-zero, the compiler will
  126.      assume that it is safe to omit a sign-extend, zero-extend, and
  127.      certain bitwise `and' instructions that truncates the count of a
  128.      shift operation.  On machines that have instructions that act on
  129.      bitfields at variable positions, which may include `bit test'
  130.      instructions, a nonzero `SHIFT_COUNT_TRUNCATED' also enables
  131.      deletion of truncations of the values that serve as arguments to
  132.      bitfield instructions.
  133.      If both types of instructions truncate the count (for shifts) and
  134.      position (for bitfield operations), or if no variable-position
  135.      bitfield instructions exist, you should define this macro.
  136.      However, on some machines, such as the 80386 and the 680x0,
  137.      truncation only applies to shift operations and not the (real or
  138.      pretended) bitfield operations.  Define `SHIFT_COUNT_TRUNCATED' to
  139.      be zero on such machines.  Instead, add patterns to the `md' file
  140.      that include the implied truncation of the shift instructions.
  141.      You need not define this macro if it would always have the value
  142.      of zero.
  143. `TRULY_NOOP_TRUNCATION (OUTPREC, INPREC)'
  144.      A C expression which is nonzero if on this machine it is safe to
  145.      "convert" an integer of INPREC bits to one of OUTPREC bits (where
  146.      OUTPREC is smaller than INPREC) by merely operating on it as if it
  147.      had only OUTPREC bits.
  148.      On many machines, this expression can be 1.
  149.      When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for
  150.      modes for which `MODES_TIEABLE_P' is 0, suboptimal code can result.
  151.      If this is the case, making `TRULY_NOOP_TRUNCATION' return 0 in
  152.      such cases may improve things.
  153. `STORE_FLAG_VALUE'
  154.      A C expression describing the value returned by a comparison
  155.      operator with an integral mode and stored by a store-flag
  156.      instruction (`sCOND') when the condition is true.  This
  157.      description must apply to *all* the `sCOND' patterns and all the
  158.      comparison operators whose results have a `MODE_INT' mode.
  159.      A value of 1 or -1 means that the instruction implementing the
  160.      comparison operator returns exactly 1 or -1 when the comparison is
  161.      true and 0 when the comparison is false.  Otherwise, the value
  162.      indicates which bits of the result are guaranteed to be 1 when the
  163.      comparison is true.  This value is interpreted in the mode of the
  164.      comparison operation, which is given by the mode of the first
  165.      operand in the `sCOND' pattern.  Either the low bit or the sign
  166.      bit of `STORE_FLAG_VALUE' be on.  Presently, only those bits are
  167.      used by the compiler.
  168.      If `STORE_FLAG_VALUE' is neither 1 or -1, the compiler will
  169.      generate code that depends only on the specified bits.  It can also
  170.      replace comparison operators with equivalent operations if they
  171.      cause the required bits to be set, even if the remaining bits are
  172.      undefined.  For example, on a machine whose comparison operators
  173.      return an `SImode' value and where `STORE_FLAG_VALUE' is defined as
  174.      `0x80000000', saying that just the sign bit is relevant, the
  175.      expression
  176.           (ne:SI (and:SI X (const_int POWER-OF-2)) (const_int 0))
  177.      can be converted to
  178.           (ashift:SI X (const_int N))
  179.      where N is the appropriate shift count to move the bit being
  180.      tested into the sign bit.
  181.      There is no way to describe a machine that always sets the
  182.      low-order bit for a true value, but does not guarantee the value
  183.      of any other bits, but we do not know of any machine that has such
  184.      an instruction.  If you are trying to port GNU CC to such a
  185.      machine, include an instruction to perform a logical-and of the
  186.      result with 1 in the pattern for the comparison operators and let
  187.      us know (*note How to Report Bugs: Bug Reporting.).
  188.      Often, a machine will have multiple instructions that obtain a
  189.      value from a comparison (or the condition codes).  Here are rules
  190.      to guide the choice of value for `STORE_FLAG_VALUE', and hence the
  191.      instructions to be used:
  192.         * Use the shortest sequence that yields a valid definition for
  193.           `STORE_FLAG_VALUE'.  It is more efficient for the compiler to
  194.           "normalize" the value (convert it to, e.g., 1 or 0) than for
  195.           the comparison operators to do so because there may be
  196.           opportunities to combine the normalization with other
  197.           operations.
  198.         * For equal-length sequences, use a value of 1 or -1, with -1
  199.           being slightly preferred on machines with expensive jumps and
  200.           1 preferred on other machines.
  201.         * As a second choice, choose a value of `0x80000001' if
  202.           instructions exist that set both the sign and low-order bits
  203.           but do not define the others.
  204.         * Otherwise, use a value of `0x80000000'.
  205.      Many machines can produce both the value chosen for
  206.      `STORE_FLAG_VALUE' and its negation in the same number of
  207.      instructions.  On those machines, you should also define a pattern
  208.      for those cases, e.g., one matching
  209.           (set A (neg:M (ne:M B C)))
  210.      Some machines can also perform `and' or `plus' operations on
  211.      condition code values with less instructions than the corresponding
  212.      `sCOND' insn followed by `and' or `plus'.  On those machines,
  213.      define the appropriate patterns.  Use the names `incscc' and
  214.      `decscc', respectively, for the patterns which perform `plus' or
  215.      `minus' operations on condition code values.  See `rs6000.md' for
  216.      some examples.  The GNU Superoptizer can be used to find such
  217.      instruction sequences on other machines.
  218.      You need not define `STORE_FLAG_VALUE' if the machine has no
  219.      store-flag instructions.
  220. `FLOAT_STORE_FLAG_VALUE'
  221.      A C expression that gives a non-zero floating point value that is
  222.      returned when comparison operators with floating-point results are
  223.      true.  Define this macro on machine that have comparison
  224.      operations that return floating-point values.  If there are no
  225.      such operations, do not define this macro.
  226. `Pmode'
  227.      An alias for the machine mode for pointers.  On most machines,
  228.      define this to be the integer mode corresponding to the width of a
  229.      hardware pointer; `SImode' on 32-bit machine or `DImode' on 64-bit
  230.      machines.  On some machines you must define this to be one of the
  231.      partial integer modes, such as `PSImode'.
  232.      The width of `Pmode' must be at least as large as the value of
  233.      `POINTER_SIZE'.  If it is not equal, you must define the macro
  234.      `POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to
  235.      `Pmode'.
  236. `FUNCTION_MODE'
  237.      An alias for the machine mode used for memory references to
  238.      functions being called, in `call' RTL expressions.  On most
  239.      machines this should be `QImode'.
  240. `INTEGRATE_THRESHOLD (DECL)'
  241.      A C expression for the maximum number of instructions above which
  242.      the function DECL should not be inlined.  DECL is a
  243.      `FUNCTION_DECL' node.
  244.      The default definition of this macro is 64 plus 8 times the number
  245.      of arguments that the function accepts.  Some people think a larger
  246.      threshold should be used on RISC machines.
  247. `SCCS_DIRECTIVE'
  248.      Define this if the preprocessor should ignore `#sccs' directives
  249.      and print no error message.
  250. `NO_IMPLICIT_EXTERN_C'
  251.      Define this macro if the system header files support C++ as well
  252.      as C.  This macro inhibits the usual method of using system header
  253.      files in C++, which is to pretend that the file's contents are
  254.      enclosed in `extern "C" {...}'.
  255. `HANDLE_PRAGMA (GETC, UNGETC, NAME)'
  256.      Define this macro if you want to implement any pragmas.  If
  257.      defined, it is a C expression whose value is 1 if the pragma was
  258.      handled by the macro, zero otherwise.  The argument GETC is a
  259.      function of type `int (*)(void)' which will return the next
  260.      character in the input stream, or EOF if no characters are left.
  261.      The argument UNGETC is a function of type `void (*)(int)' which
  262.      will push a character back into the input stream.  The argument
  263.      NAME is the word following #pragma in the input stream.  The input
  264.      stream pointer will be pointing just beyond the end of this word.
  265.      The input stream should be left undistrubed if the expression
  266.      returns zero, otherwise it should be pointing at the next
  267.      character after the end of the pragma.  Any characters remaining
  268.      on the line will be ignored.
  269.      It is generally a bad idea to implement new uses of `#pragma'.  The
  270.      only reason to define this macro is for compatibility with other
  271.      compilers that do support `#pragma' for the sake of any user
  272.      programs which already use it.
  273.      If the pragma can be implemented by atttributes then the macro
  274.      `INSERT_ATTRIBUTES' might be a useful one to define as well.
  275.      Note: older versions of this macro only had two arguments: STREAM
  276.      and TOKEN.  The macro was changed in order to allow it to work
  277.      when gcc is built both with and without a cpp library.
  278. `HANDLE_SYSV_PRAGMA'
  279.      Define this macro (to a value of 1) if you want the System V style
  280.      pragmas `#pragma pack(<n>)' and `#pragma weak <name> [=<value>]'
  281.      to be supported by gcc.
  282.      The pack pragma specifies the maximum alignment (in bytes) of
  283.      fields within a structure, in much the same way as the
  284.      `__aligned__' and `__packed__' `__attribute__'s do.  A pack value
  285.      of zero resets the behaviour to the default.
  286.      The weak pragma only works if `SUPPORTS_WEAK' and
  287.      `ASM_WEAKEN_LABEL' are defined.  If enabled it allows the creation
  288.      of specifically named weak labels, optionally with a value.
  289. `HANDLE_PRAGMA_PACK_PUSH_POP'
  290.      Define this macro (to a value of 1) if you want to support the
  291.      Win32 style pragmas `#pragma pack(push,<n>)' and `#pragma
  292.      pack(pop)'.  The pack(push,<n>) pragma specifies the maximum
  293.      alignment (in bytes) of fields within a structure, in much the
  294.      same way as the `__aligned__' and `__packed__' `__attribute__'s
  295.      do.  A pack value of zero resets the behaviour to the default.
  296.      Successive invocations of this pragma cause the previous values to
  297.      be stacked, so that invocations of `#pragma pack(pop)' will return
  298.      to the previous value.
  299. `VALID_MACHINE_DECL_ATTRIBUTE (DECL, ATTRIBUTES, IDENTIFIER, ARGS)'
  300.      If defined, a C expression whose value is nonzero if IDENTIFIER
  301.      with arguments ARGS is a valid machine specific attribute for DECL.
  302.      The attributes in ATTRIBUTES have previously been assigned to DECL.
  303. `VALID_MACHINE_TYPE_ATTRIBUTE (TYPE, ATTRIBUTES, IDENTIFIER, ARGS)'
  304.      If defined, a C expression whose value is nonzero if IDENTIFIER
  305.      with arguments ARGS is a valid machine specific attribute for TYPE.
  306.      The attributes in ATTRIBUTES have previously been assigned to TYPE.
  307. `COMP_TYPE_ATTRIBUTES (TYPE1, TYPE2)'
  308.      If defined, a C expression whose value is zero if the attributes on
  309.      TYPE1 and TYPE2 are incompatible, one if they are compatible, and
  310.      two if they are nearly compatible (which causes a warning to be
  311.      generated).
  312. `SET_DEFAULT_TYPE_ATTRIBUTES (TYPE)'
  313.      If defined, a C statement that assigns default attributes to newly
  314.      defined TYPE.
  315. `MERGE_MACHINE_TYPE_ATTRIBUTES (TYPE1, TYPE2)'
  316.      Define this macro if the merging of type attributes needs special
  317.      handling.  If defined, the result is a list of the combined
  318.      TYPE_ATTRIBUTES of TYPE1 and TYPE2.  It is assumed that comptypes
  319.      has already been called and returned 1.
  320. `MERGE_MACHINE_DECL_ATTRIBUTES (OLDDECL, NEWDECL)'
  321.      Define this macro if the merging of decl attributes needs special
  322.      handling.  If defined, the result is a list of the combined
  323.      DECL_MACHINE_ATTRIBUTES of OLDDECL and NEWDECL.  NEWDECL is a
  324.      duplicate declaration of OLDDECL.  Examples of when this is needed
  325.      are when one attribute overrides another, or when an attribute is
  326.      nullified by a subsequent definition.
  327. `INSERT_ATTRIBUTES (NODE, ATTR_PTR, PREFIX_PTR)'
  328.      Define this macro if you want to be able to add attributes to a
  329.      decl when it is being created.  This is normally useful for
  330.      backends which wish to implement a pragma by using the attributes
  331.      which correspond to the pragma's effect.  The NODE argument is the
  332.      decl which is being created.  The ATTR_PTR argument is a pointer
  333.      to the attribute list for this decl.  The PREFIX_PTR is a pointer
  334.      to the list of attributes that have appeared after the specifiers
  335.      and modifiers of the declaration, but before the declaration
  336.      proper.
  337. `SET_DEFAULT_DECL_ATTRIBUTES (DECL, ATTRIBUTES)'
  338.      If defined, a C statement that assigns default attributes to newly
  339.      defined DECL.
  340. `DOLLARS_IN_IDENTIFIERS'
  341.      Define this macro to control use of the character `$' in identifier
  342.      names.  0 means `$' is not allowed by default; 1 means it is
  343.      allowed.  1 is the default; there is no need to define this macro
  344.      in that case.  This macro controls the compiler proper; it does
  345.      not affect the preprocessor.
  346. `NO_DOLLAR_IN_LABEL'
  347.      Define this macro if the assembler does not accept the character
  348.      `$' in label names.  By default constructors and destructors in
  349.      G++ have `$' in the identifiers.  If this macro is defined, `.' is
  350.      used instead.
  351. `NO_DOT_IN_LABEL'
  352.      Define this macro if the assembler does not accept the character
  353.      `.' in label names.  By default constructors and destructors in G++
  354.      have names that use `.'.  If this macro is defined, these names
  355.      are rewritten to avoid `.'.
  356. `DEFAULT_MAIN_RETURN'
  357.      Define this macro if the target system expects every program's
  358.      `main' function to return a standard "success" value by default
  359.      (if no other value is explicitly returned).
  360.      The definition should be a C statement (sans semicolon) to
  361.      generate the appropriate rtl instructions.  It is used only when
  362.      compiling the end of `main'.
  363. `HAVE_ATEXIT'
  364.      Define this if the target system supports the function `atexit'
  365.      from the ANSI C standard.  If this is not defined, and
  366.      `INIT_SECTION_ASM_OP' is not defined, a default `exit' function
  367.      will be provided to support C++.
  368. `EXIT_BODY'
  369.      Define this if your `exit' function needs to do something besides
  370.      calling an external function `_cleanup' before terminating with
  371.      `_exit'.  The `EXIT_BODY' macro is only needed if neither
  372.      `HAVE_ATEXIT' nor `INIT_SECTION_ASM_OP' are defined.
  373. `INSN_SETS_ARE_DELAYED (INSN)'
  374.      Define this macro as a C expression that is nonzero if it is safe
  375.      for the delay slot scheduler to place instructions in the delay
  376.      slot of INSN, even if they appear to use a resource set or
  377.      clobbered in INSN.  INSN is always a `jump_insn' or an `insn'; GNU
  378.      CC knows that every `call_insn' has this behavior.  On machines
  379.      where some `insn' or `jump_insn' is really a function call and
  380.      hence has this behavior, you should define this macro.
  381.      You need not define this macro if it would always return zero.
  382. `INSN_REFERENCES_ARE_DELAYED (INSN)'
  383.      Define this macro as a C expression that is nonzero if it is safe
  384.      for the delay slot scheduler to place instructions in the delay
  385.      slot of INSN, even if they appear to set or clobber a resource
  386.      referenced in INSN.  INSN is always a `jump_insn' or an `insn'.
  387.      On machines where some `insn' or `jump_insn' is really a function
  388.      call and its operands are registers whose use is actually in the
  389.      subroutine it calls, you should define this macro.  Doing so
  390.      allows the delay slot scheduler to move instructions which copy
  391.      arguments into the argument registers into the delay slot of INSN.
  392.      You need not define this macro if it would always return zero.
  393. `MACHINE_DEPENDENT_REORG (INSN)'
  394.      In rare cases, correct code generation requires extra machine
  395.      dependent processing between the second jump optimization pass and
  396.      delayed branch scheduling.  On those machines, define this macro
  397.      as a C statement to act on the code starting at INSN.
  398. `MULTIPLE_SYMBOL_SPACES'
  399.      Define this macro if in some cases global symbols from one
  400.      translation unit may not be bound to undefined symbols in another
  401.      translation unit without user intervention.  For instance, under
  402.      Microsoft Windows symbols must be explicitly imported from shared
  403.      libraries (DLLs).
  404. `ISSUE_RATE'
  405.      A C expression that returns how many instructions can be issued at
  406.      the same time if the machine is a superscalar machine.  This is
  407.      only used by the `Haifa' scheduler, and not the traditional
  408.      scheduler.
  409. `MD_SCHED_INIT (FILE, VERBOSE)'
  410.      A C statement which is executed by the `Haifa' scheduler at the
  411.      beginning of each block of instructions that are to be scheduled.
  412.      FILE is either a null pointer, or a stdio stream to write any
  413.      debug output to.  VERBOSE is the verbose level provided by
  414.      `-fsched-verbose-'N.
  415. `MD_SCHED_REORDER (FILE, VERBOSE, READY, N_READY)'
  416.      A C statement which is executed by the `Haifa' scheduler after it
  417.      has scheduled the ready list to allow the machine description to
  418.      reorder it (for example to combine two small instructions together
  419.      on `VLIW' machines).  FILE is either a null pointer, or a stdio
  420.      stream to write any debug output to.  VERBOSE is the verbose level
  421.      provided by `-fsched-verbose-'N.  READY is a pointer to the ready
  422.      list of instructions that are ready to be scheduled.  N_READY is
  423.      the number of elements in the ready list.  The scheduler reads the
  424.      ready list in reverse order, starting with READY[N_READY-1] and
  425.      going to READY[0].
  426. `MD_SCHED_VARIABLE_ISSUE (FILE, VERBOSE, INSN, MORE)'
  427.      A C statement which is executed by the `Haifa' scheduler after it
  428.      has scheduled an insn from the ready list.  FILE is either a null
  429.      pointer, or a stdio stream to write any debug output to.  VERBOSE
  430.      is the verbose level provided by `-fsched-verbose-'N.  INSN is the
  431.      instruction that was scheduled.  MORE is the number of
  432.      instructions that can be issued in the current cycle.  The
  433.      `MD_SCHED_VARIABLE_ISSUE' macro is responsible for updating the
  434.      value of MORE (typically by MORE-).
  435. `MAX_INTEGER_COMPUTATION_MODE'
  436.      Define this to the largest integer machine mode which can be used
  437.      for operations other than load, store and copy operations.
  438.      You need only define this macro if the target holds values larger
  439.      than `word_mode' in general purpose registers.  Most targets
  440.      should not define this macro.
  441. `MATH_LIBRARY'
  442.      Define this macro as a C string constant for the linker argument
  443.      to link in the system math library, or `""' if the target does not
  444.      have a separate math library.
  445.      You need only define this macro if the default of `"-lm"' is wrong.
  446. File: gcc.info,  Node: Config,  Next: Fragments,  Prev: Target Macros,  Up: Top
  447. The Configuration File
  448. **********************
  449.    The configuration file `xm-MACHINE.h' contains macro definitions
  450. that describe the machine and system on which the compiler is running,
  451. unlike the definitions in `MACHINE.h', which describe the machine for
  452. which the compiler is producing output.  Most of the values in
  453. `xm-MACHINE.h' are actually the same on all machines that GCC runs on,
  454. so large parts of all configuration files are identical.  But there are
  455. some macros that vary:
  456. `USG'
  457.      Define this macro if the host system is System V.
  458. `VMS'
  459.      Define this macro if the host system is VMS.
  460. `FATAL_EXIT_CODE'
  461.      A C expression for the status code to be returned when the compiler
  462.      exits after serious errors.
  463. `SUCCESS_EXIT_CODE'
  464.      A C expression for the status code to be returned when the compiler
  465.      exits without serious errors.
  466. `HOST_WORDS_BIG_ENDIAN'
  467.      Defined if the host machine stores words of multi-word values in
  468.      big-endian order.  (GCC does not depend on the host byte ordering
  469.      within a word.)
  470. `HOST_FLOAT_WORDS_BIG_ENDIAN'
  471.      Define this macro to be 1 if the host machine stores `DFmode',
  472.      `XFmode' or `TFmode' floating point numbers in memory with the
  473.      word containing the sign bit at the lowest address; otherwise,
  474.      define it to be zero.
  475.      This macro need not be defined if the ordering is the same as for
  476.      multi-word integers.
  477. `HOST_FLOAT_FORMAT'
  478.      A numeric code distinguishing the floating point format for the
  479.      host machine.  See `TARGET_FLOAT_FORMAT' in *Note Storage
  480.      Layout::. for the alternatives and default.
  481. `HOST_BITS_PER_CHAR'
  482.      A C expression for the number of bits in `char' on the host
  483.      machine.
  484. `HOST_BITS_PER_SHORT'
  485.      A C expression for the number of bits in `short' on the host
  486.      machine.
  487. `HOST_BITS_PER_INT'
  488.      A C expression for the number of bits in `int' on the host machine.
  489. `HOST_BITS_PER_LONG'
  490.      A C expression for the number of bits in `long' on the host
  491.      machine.
  492. `ONLY_INT_FIELDS'
  493.      Define this macro to indicate that the host compiler only supports
  494.      `int' bit fields, rather than other integral types, including
  495.      `enum', as do most C compilers.
  496. `OBSTACK_CHUNK_SIZE'
  497.      A C expression for the size of ordinary obstack chunks.  If you
  498.      don't define this, a usually-reasonable default is used.
  499. `OBSTACK_CHUNK_ALLOC'
  500.      The function used to allocate obstack chunks.  If you don't define
  501.      this, `xmalloc' is used.
  502. `OBSTACK_CHUNK_FREE'
  503.      The function used to free obstack chunks.  If you don't define
  504.      this, `free' is used.
  505. `USE_C_ALLOCA'
  506.      Define this macro to indicate that the compiler is running with the
  507.      `alloca' implemented in C.  This version of `alloca' can be found
  508.      in the file `alloca.c'; to use it, you must also alter the
  509.      `Makefile' variable `ALLOCA'.  (This is done automatically for the
  510.      systems on which we know it is needed.)
  511.      If you do define this macro, you should probably do it as follows:
  512.           #ifndef __GNUC__
  513.           #define USE_C_ALLOCA
  514.           #else
  515.           #define alloca __builtin_alloca
  516.           #endif
  517.      so that when the compiler is compiled with GCC it uses the more
  518.      efficient built-in `alloca' function.
  519. `FUNCTION_CONVERSION_BUG'
  520.      Define this macro to indicate that the host compiler does not
  521.      properly handle converting a function value to a
  522.      pointer-to-function when it is used in an expression.
  523. `MULTIBYTE_CHARS'
  524.      Define this macro to enable support for multibyte characters in the
  525.      input to GCC.  This requires that the host system support the ANSI
  526.      C library functions for converting multibyte characters to wide
  527.      characters.
  528. `POSIX'
  529.      Define this if your system is POSIX.1 compliant.
  530. `NO_SYS_SIGLIST'
  531.      Define this if your system *does not* provide the variable
  532.      `sys_siglist'.
  533.      Some systems do provide this variable, but with a different name
  534.      such as `_sys_siglist'.  On these systems, you can define
  535.      `sys_siglist' as a macro which expands into the name actually
  536.      provided.
  537.      Autoconf normally defines `SYS_SIGLIST_DECLARED' when it finds a
  538.      declaration of `sys_siglist' in the system header files.  However,
  539.      when you define `sys_siglist' to a different name autoconf will
  540.      not automatically define `SYS_SIGLIST_DECLARED'.  Therefore, if
  541.      you define `sys_siglist', you should also define
  542.      `SYS_SIGLIST_DECLARED'.
  543. `USE_PROTOTYPES'
  544.      Define this to be 1 if you know that the host compiler supports
  545.      prototypes, even if it doesn't define __STDC__, or define it to be
  546.      0 if you do not want any prototypes used in compiling GCC.  If
  547.      `USE_PROTOTYPES' is not defined, it will be determined
  548.      automatically whether your compiler supports prototypes by
  549.      checking if `__STDC__' is defined.
  550. `NO_MD_PROTOTYPES'
  551.      Define this if you wish suppression of prototypes generated from
  552.      the machine description file, but to use other prototypes within
  553.      GCC.  If `USE_PROTOTYPES' is defined to be 0, or the host compiler
  554.      does not support prototypes, this macro has no effect.
  555. `MD_CALL_PROTOTYPES'
  556.      Define this if you wish to generate prototypes for the `gen_call'
  557.      or `gen_call_value' functions generated from the machine
  558.      description file.  If `USE_PROTOTYPES' is defined to be 0, or the
  559.      host compiler does not support prototypes, or `NO_MD_PROTOTYPES'
  560.      is defined, this macro has no effect.  As soon as all of the
  561.      machine descriptions are modified to have the appropriate number
  562.      of arguments, this macro will be removed.
  563. `PATH_SEPARATOR'
  564.      Define this macro to be a C character constant representing the
  565.      character used to separate components in paths.  The default value
  566.      is the colon character
  567. `DIR_SEPARATOR'
  568.      If your system uses some character other than slash to separate
  569.      directory names within a file specification, define this macro to
  570.      be a C character constant specifying that character.  When GCC
  571.      displays file names, the character you specify will be used.  GCC
  572.      will test for both slash and the character you specify when
  573.      parsing filenames.
  574. `OBJECT_SUFFIX'
  575.      Define this macro to be a C string representing the suffix for
  576.      object files on your machine.  If you do not define this macro,
  577.      GCC will use `.o' as the suffix for object files.
  578. `EXECUTABLE_SUFFIX'
  579.      Define this macro to be a C string representing the suffix for
  580.      executable files on your machine.  If you do not define this
  581.      macro, GCC will use the null string as the suffix for object files.
  582. `COLLECT_EXPORT_LIST'
  583.      If defined, `collect2' will scan the individual object files
  584.      specified on its command line and create an export list for the
  585.      linker.  Define this macro for systems like AIX, where the linker
  586.      discards object files that are not referenced from `main' and uses
  587.      export lists.
  588.    In addition, configuration files for system V define `bcopy',
  589. `bzero' and `bcmp' as aliases.  Some files define `alloca' as a macro
  590. when compiled with GCC, in order to take advantage of the benefit of
  591. GCC's built-in `alloca'.
  592. File: gcc.info,  Node: Fragments,  Next: Funding,  Prev: Config,  Up: Top
  593. Makefile Fragments
  594. ******************
  595.    When you configure GCC using the `configure' script (*note
  596. Installation::.), it will construct the file `Makefile' from the
  597. template file `Makefile.in'.  When it does this, it will incorporate
  598. makefile fragment files from the `config' directory, named `t-TARGET'
  599. and `x-HOST'.  If these files do not exist, it means nothing needs to
  600. be added for a given target or host.
  601. * Menu:
  602. * Target Fragment:: Writing the `t-TARGET' file.
  603. * Host Fragment::   Writing the `x-HOST' file.
  604. File: gcc.info,  Node: Target Fragment,  Next: Host Fragment,  Up: Fragments
  605. The Target Makefile Fragment
  606. ============================
  607.    The target makefile fragment, `t-TARGET', defines special target
  608. dependent variables and targets used in the `Makefile':
  609. `LIBGCC1'
  610.      The rule to use to build `libgcc1.a'.  If your target does not
  611.      need to use the functions in `libgcc1.a', set this to empty.
  612.      *Note Interface::.
  613. `CROSS_LIBGCC1'
  614.      The rule to use to build `libgcc1.a' when building a cross
  615.      compiler.  If your target does not need to use the functions in
  616.      `libgcc1.a', set this to empty.  *Note Cross Runtime::.
  617. `LIBGCC2_CFLAGS'
  618.      Compiler flags to use when compiling `libgcc2.c'.
  619. `LIB2FUNCS_EXTRA'
  620.      A list of source file names to be compiled or assembled and
  621.      inserted into `libgcc.a'.
  622. `CRTSTUFF_T_CFLAGS'
  623.      Special flags used when compiling `crtstuff.c'.  *Note
  624.      Initialization::.
  625. `CRTSTUFF_T_CFLAGS_S'
  626.      Special flags used when compiling `crtstuff.c' for shared linking.
  627.      Used if you use `crtbeginS.o' and `crtendS.o' in `EXTRA-PARTS'.
  628.      *Note Initialization::.
  629. `MULTILIB_OPTIONS'
  630.      For some targets, invoking GCC in different ways produces objects
  631.      that can not be linked together.  For example, for some targets GCC
  632.      produces both big and little endian code.  For these targets, you
  633.      must arrange for multiple versions of `libgcc.a' to be compiled,
  634.      one for each set of incompatible options.  When GCC invokes the
  635.      linker, it arranges to link in the right version of `libgcc.a',
  636.      based on the command line options used.
  637.      The `MULTILIB_OPTIONS' macro lists the set of options for which
  638.      special versions of `libgcc.a' must be built.  Write options that
  639.      are mutually incompatible side by side, separated by a slash.
  640.      Write options that may be used together separated by a space.  The
  641.      build procedure will build all combinations of compatible options.
  642.      For example, if you set `MULTILIB_OPTIONS' to `m68000/m68020
  643.      msoft-float', `Makefile' will build special versions of `libgcc.a'
  644.      using the following sets of options:  `-m68000', `-m68020',
  645.      `-msoft-float', `-m68000 -msoft-float', and `-m68020 -msoft-float'.
  646. `MULTILIB_DIRNAMES'
  647.      If `MULTILIB_OPTIONS' is used, this variable specifies the
  648.      directory names that should be used to hold the various libraries.
  649.      Write one element in `MULTILIB_DIRNAMES' for each element in
  650.      `MULTILIB_OPTIONS'.  If `MULTILIB_DIRNAMES' is not used, the
  651.      default value will be `MULTILIB_OPTIONS', with all slashes treated
  652.      as spaces.
  653.      For example, if `MULTILIB_OPTIONS' is set to `m68000/m68020
  654.      msoft-float', then the default value of `MULTILIB_DIRNAMES' is
  655.      `m68000 m68020 msoft-float'.  You may specify a different value if
  656.      you desire a different set of directory names.
  657. `MULTILIB_MATCHES'
  658.      Sometimes the same option may be written in two different ways.
  659.      If an option is listed in `MULTILIB_OPTIONS', GCC needs to know
  660.      about any synonyms.  In that case, set `MULTILIB_MATCHES' to a
  661.      list of items of the form `option=option' to describe all relevant
  662.      synonyms.  For example, `m68000=mc68000 m68020=mc68020'.
  663. `MULTILIB_EXCEPTIONS'
  664.      Sometimes when there are multiple sets of `MULTILIB_OPTIONS' being
  665.      specified, there are combinations that should not be built.  In
  666.      that case, set `MULTILIB_EXCEPTIONS' to be all of the switch
  667.      exceptions in shell case syntax that should not be built.
  668.      For example, in the PowerPC embedded ABI support, it was not
  669.      desirable to build libraries that compiled with the
  670.      `-mcall-aixdesc' option and either of the `-mcall-aixdesc' or
  671.      `-mlittle' options at the same time, and therefore
  672.      `MULTILIB_EXCEPTIONS' is set to `*mrelocatable/*mcall-aixdesc*
  673.      *mlittle/*mcall-aixdesc*'.
  674. `MULTILIB_EXTRA_OPTS'
  675.      Sometimes it is desirable that when building multiple versions of
  676.      `libgcc.a' certain options should always be passed on to the
  677.      compiler.  In that case, set `MULTILIB_EXTRA_OPTS' to be the list
  678.      of options to be used for all builds.
  679. File: gcc.info,  Node: Host Fragment,  Prev: Target Fragment,  Up: Fragments
  680. The Host Makefile Fragment
  681. ==========================
  682.    The host makefile fragment, `x-HOST', defines special host dependent
  683. variables and targets used in the `Makefile':
  684.      The compiler to use when building the first stage.
  685. `CLIB'
  686.      Additional host libraries to link with.
  687. `OLDCC'
  688.      The compiler to use when building `libgcc1.a' for a native
  689.      compilation.
  690. `OLDAR'
  691.      The version of `ar' to use when building `libgcc1.a' for a native
  692.      compilation.
  693. `INSTALL'
  694.      The install program to use.
  695. File: gcc.info,  Node: Funding,  Next: GNU/Linux,  Prev: Fragments,  Up: Top
  696. Funding Free Software
  697. *********************
  698.    If you want to have more free software a few years from now, it makes
  699. sense for you to help encourage people to contribute funds for its
  700. development.  The most effective approach known is to encourage
  701. commercial redistributors to donate.
  702.    Users of free software systems can boost the pace of development by
  703. encouraging for-a-fee distributors to donate part of their selling price
  704. to free software developers--the Free Software Foundation, and others.
  705.    The way to convince distributors to do this is to demand it and
  706. expect it from them.  So when you compare distributors, judge them
  707. partly by how much they give to free software development.  Show
  708. distributors they must compete to be the one who gives the most.
  709.    To make this approach work, you must insist on numbers that you can
  710. compare, such as, "We will donate ten dollars to the Frobnitz project
  711. for each disk sold."  Don't be satisfied with a vague promise, such as
  712. "A portion of the profits are donated," since it doesn't give a basis
  713. for comparison.
  714.    Even a precise fraction "of the profits from this disk" is not very
  715. meaningful, since creative accounting and unrelated business decisions
  716. can greatly alter what fraction of the sales price counts as profit.
  717. If the price you pay is $50, ten percent of the profit is probably less
  718. than a dollar; it might be a few cents, or nothing at all.
  719.    Some redistributors do development work themselves.  This is useful
  720. too; but to keep everyone honest, you need to inquire how much they do,
  721. and what kind.  Some kinds of development make much more long-term
  722. difference than others.  For example, maintaining a separate version of
  723. a program contributes very little; maintaining the standard version of a
  724. program for the whole community contributes much.  Easy new ports
  725. contribute little, since someone else would surely do them; difficult
  726. ports such as adding a new CPU to the GNU Compiler Collection
  727. contribute more; major new features or packages contribute the most.
  728.    By establishing the idea that supporting further development is "the
  729. proper thing to do" when distributing free software for a fee, we can
  730. assure a steady flow of resources into making more free software.
  731.      Copyright (C) 1994 Free Software Foundation, Inc.
  732.      Verbatim copying and redistribution of this section is permitted
  733.      without royalty; alteration is not permitted.
  734. File: gcc.info,  Node: GNU/Linux,  Next: Copying,  Prev: Funding,  Up: Top
  735. Linux and the GNU Project
  736. *************************
  737.    Many computer users run a modified version of the GNU system every
  738. day, without realizing it.  Through a peculiar turn of events, the
  739. version of GNU which is widely used today is more often known as
  740. "Linux", and many users are not aware of the extent of its connection
  741. with the GNU Project.
  742.    There really is a Linux; it is a kernel, and these people are using
  743. it.  But you can't use a kernel by itself; a kernel is useful only as
  744. part of a whole system.  The system in which Linux is typically used is
  745. a modified variant of the GNU system--in other words, a Linux-based GNU
  746. system.
  747.    Many users are not fully aware of the distinction between the kernel,
  748. which is Linux, and the whole system, which they also call "Linux".
  749. The ambiguous use of the name doesn't promote understanding.
  750.    Programmers generally know that Linux is a kernel.  But since they
  751. have generally heard the whole system called "Linux" as well, they
  752. often envisage a history which fits that name.  For example, many
  753. believe that once Linus Torvalds finished writing the kernel, his
  754. friends looked around for other free software, and for no particular
  755. reason most everything necessary to make a Unix-like system was already
  756. available.
  757.    What they found was no accident--it was the GNU system.  The
  758. available free software added up to a complete system because the GNU
  759. Project had been working since 1984 to make one.  The GNU Manifesto had
  760. set forth the goal of developing a free Unix-like system, called GNU.
  761. By the time Linux was written, the system was almost finished.
  762.    Most free software projects have the goal of developing a particular
  763. program for a particular job.  For example, Linus Torvalds set out to
  764. write a Unix-like kernel (Linux); Donald Knuth set out to write a text
  765. formatter (TeX); Bob Scheifler set out to develop a window system (X
  766. Windows).  It's natural to measure the contribution of this kind of
  767. project by specific programs that came from the project.
  768.    If we tried to measure the GNU Project's contribution in this way,
  769. what would we conclude?  One CD-ROM vendor found that in their "Linux
  770. distribution", GNU software was the largest single contingent, around
  771. 28% of the total source code, and this included some of the essential
  772. major components without which there could be no system.  Linux itself
  773. was about 3%.  So if you were going to pick a name for the system based
  774. on who wrote the programs in the system, the most appropriate single
  775. choice would be "GNU".
  776.    But we don't think that is the right way to consider the question.
  777. The GNU Project was not, is not, a project to develop specific software
  778. packages.  It was not a project to develop a C compiler, although we
  779. did.  It was not a project to develop a text editor, although we
  780. developed one.  The GNU Project's aim was to develop *a complete free
  781. Unix-like system*.
  782.    Many people have made major contributions to the free software in the
  783. system, and they all deserve credit.  But the reason it is *a
  784. system*--and not just a collection of useful programs--is because the
  785. GNU Project set out to make it one.  We wrote the programs that were
  786. needed to make a *complete* free system.  We wrote essential but
  787. unexciting major components, such as the assembler and linker, because
  788. you can't have a system without them.  A complete system needs more
  789. than just programming tools, so we wrote other components as well, such
  790. as the Bourne Again SHell, the PostScript interpreter Ghostscript, and
  791. the GNU C library.
  792.    By the early 90s we had put together the whole system aside from the
  793. kernel (and we were also working on a kernel, the GNU Hurd, which runs
  794. on top of Mach).  Developing this kernel has been a lot harder than we
  795. expected, and we are still working on finishing it.
  796.    Fortunately, you don't have to wait for it, because Linux is working
  797. now.  When Linus Torvalds wrote Linux, he filled the last major gap.
  798. People could then put Linux together with the GNU system to make a
  799. complete free system: a Linux-based GNU system (or GNU/Linux system,
  800. for short).
  801.    Putting them together sounds simple, but it was not a trivial job.
  802. The GNU C library (called glibc for short) needed substantial changes.
  803. Integrating a complete system as a distribution that would work "out of
  804. the box" was a big job, too.  It required addressing the issue of how
  805. to install and boot the system--a problem we had not tackled, because
  806. we hadn't yet reached that point.  The people who developed the various
  807. system distributions made a substantial contribution.
  808.    The GNU Project supports GNU/Linux systems as well as *the* GNU
  809. system--even with funds.  We funded the rewriting of the Linux-related
  810. extensions to the GNU C library, so that now they are well integrated,
  811. and the newest GNU/Linux systems use the current library release with
  812. no changes.  We also funded an early stage of the development of Debian
  813. GNU/Linux.
  814.    We use Linux-based GNU systems today for most of our work, and we
  815. hope you use them too.  But please don't confuse the public by using the
  816. name "Linux" ambiguously.  Linux is the kernel, one of the essential
  817. major components of the system.  The system as a whole is more or less
  818. the GNU system.
  819.